<%@ page contentType="text/html;charset=UTF-8" language="java"  import="java.util.*" trimDirectiveWhitespaces="true" %>
<%@include file="/WEB-INF/pages/common/taglib.jsp"%>
<head>
    <title>检测订单详情</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <%@include file="/WEB-INF/pages/common/commonCss.jsp"%>
    <link rel="stylesheet" href="${basePath}/resources/css/fullcalendar.css" />
    <link rel="stylesheet" href="${basePath}/resources/css/matrix-style.css" />
    <link rel="stylesheet" href="${basePath}/resources/css/matrix-media.css" />
    <link rel="stylesheet" href="${basePath}/resources/css/jquery.gritter.css" />
    <link rel="stylesheet" href="${basePath}/resources/css/admin/showImg.css" />


</head>
<style>
    *{
        font-family: "微软雅黑";
        font-size: 12px;
    }
    .widget-box li{
        line-height: 50px;
    }

    .widget-box  li.h100 {
        line-height: 100px;
        float: left;
    }
    .widget-box .info li{
        line-height: 20px;
    }
    .widget-box  .user-thumb{
        height: 100px;
        width: 100px;
    }
    .totalprice{
        padding:5px 10px;
        float: right;
    }
    .red{
        color:red;
    }
    .paddingR20{
        padding-right: 20px;
    }
    .fix_hgt {
        height: 130px;
        overflow: hidden;
    }


</style>
<body>

<!--Header-part-->

<!--close-top-serch-->
<%@include file="/WEB-INF/pages/common/head.jsp"%>

<!--sidebar-menu-->
<%@include file="/WEB-INF/pages/common/left.jsp"%>
<!--sidebar-menu-->

<!--main-container-part-->
<div id="content">
    <!--breadcrumbs-->
    <div id="content-header">
        <div id="breadcrumb">
            <a href="${adminPath}/index" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> 首页</a>
            <a href="" title="Go to Home" class="tip-bottom">检测订单详情</a>
        </div>
    </div>
    <!--End-breadcrumbs-->

    <!--Action boxes-->
    <div class="container-fluid">

        <!--End-Chart-box-->
        <hr/>
        <div class="row-fluid">
            <div class="span6">
                <div class="widget-box" style="overflow: hidden">
                    <div class="widget-title"><span class="icon"><i class="icon-user"></i></span>
                        <h5>会员信息</h5>
                    </div>
                    <div class="widget-content nopadding fix_hgt">
                        <ul class="recent-posts">
                            <li>
                                <div class="user-thumb"> <img width="100" height="100" alt="User" src="${order.headimgurl}"> </div>
                                <div class="article-post">
                                    <span class="user-info paddingR20" >昵称: ${order.nickname}</span>
                                    <span class="user-info">手机: ${order.phone}</span>
                                    <p>地区:${order.province} ${order.city} ${order.country} </p>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>




                <div class="widget-box">
                    <div class="widget-title">
                        <ul class="nav nav-tabs">
                            <li class="active"><a data-toggle="tab" href="#tab1">订单信息</a></li>
                            <li><a data-toggle="tab" href="#tab2">收货信息</a></li>
                        </ul>
                    </div>
                    <div class="widget-content tab-content">
                        <div id="tab1" class="tab-pane active">
                            <img src="${order.qrcode_url}" alt=""/>
                            <p><span class="paddingR20">下单编号:</span>${order.orderno} </p>
                            <p><span class="paddingR20">下单时间:</span>${tz:formatDate(order.create_time,'yyyy-MM-dd HH:mm:ss')} </p>
                            <p><span class="paddingR20">订单状态:</span>${order.orderstatus} </p>
                            <p><span class="paddingR20">下单价格:</span>
                                <span class="red">￥ ${order.totalprice==null?'暂无':(tz:formatDouble(order.totalprice))}</span>
                            </p>
                            <p><span class="paddingR20">下单数量:</span>${order.totalnum} </p>
                            <p><span class="paddingR20">实付金额:</span>
                                <span class="red">￥${order.actualpayprice==null?'暂无':(tz:formatDouble(order.actualpayprice))}</span>
                            </p>
                        </div>
                        <div id="tab2" class="tab-pane">
                            <p>收货地址: ${order.user_name},${order.tel_number} ,${province_name} ${order.city_name}  ${order.country_name} ${order.detail_info} ${order.user_name} ${order.user_name}</p>
                            <p>运送方式:</p>
                            <p>物流公司名称:</p>
                            <p>运单号:</p>
                        </div>
                    </div>
                </div>


                <div class="widget-box">
                    <div class="widget-title">
                        <ul class="nav nav-tabs">
                            <li class="active"><a data-toggle="tab" href="#tab3">买方物流信息</a></li>
                            <li><a data-toggle="tab" href="#tab4">平台物流信息</a></li>
                        </ul>
                    </div>
                    <div class="widget-content tab-content">
                        <div id="tab3" class="tab-pane active">
                            <c:if test="${order.userlogisticsno!=null && order.userlogisticsnoComp!=null}" >
                                <h6><span>快递公司: ${order.userlogisticCompany}</span><span style="padding-left:2rem">单号: ${order.userlogisticsno}</span></h6>
                            </c:if>
                            <input type="hidden" value="${order.userlogisticsno}" id="userlogisticsno">
                            <input type="hidden" value="${order.userlogisticsnoComp}" id="userlogisticsnoComp">
                            <div class="paddingR20"><p>暂无物流信息</p></div>
                        </div>
                        <div id="tab4" class="tab-pane">
                            <c:if test="${order.logisticsno!=null}" >
                                <h6>
                                    <span>快递公司: ${order.logisticCompany}</span><span style="padding-left:2rem">单号: ${order.logisticsno}</span>
                                    <span style="padding-left:2rem">
                                        <a href="${adminPath}/order/editLogistinfo/${order.orderno}/${order.type}"> <i class="iconfont icon-edit" title="编辑"></i></a>
                                    </span>
                                </h6>
                            </c:if>
                            <input type="hidden" value="${order.logisticsno}" id="logisticsno">
                            <input type="hidden" value="${order.logisticsnoComp}" id="logisticsnoComp">
                            <div class="paddingR20"><p>暂无物流信息</p></div>
                        </div>
                    </div>
                </div>


            </div>

            <div class="span6">

                <div class="widget-box">
                    <div class="widget-title bg_ly" data-toggle="collapse" href="#collapseG2"><span class="icon"><i class="icon-chevron-down"></i></span>
                        <h5>服务商品信息</h5>
                    </div>
                    <div class="widget-content nopadding collapse in" id="collapseG2">
                        <ul class="recent-posts">
                            <c:forEach items="${pictures}" var="item">
                                <li class="h100"  >
                                    <img width="100" height="100" alt="User" src="${item.url}" style="height:100px;display: inline-block;float: left">
                                </li>
                            </c:forEach>
                        </ul>

                    </div>
                    <div style="padding: 1rem;">
                        <p><span class="paddingR20">服务产品材质:</span>${gooddetail.metelName} </p>
                        <p><span class="paddingR20">服务产品类别:</span>${gooddetail.name} </p>
                        <p><span class="paddingR20">服务数量:</span>${gooddetail.num} </p>
                        <p><span class="paddingR20">客户备注:</span>${gooddetail.memo} </p>
                        <p><span class="paddingR20">邮寄方式:</span>${gooddetail.sendWayName} </p>
                        <p><span class="paddingR20">取件方式:</span>${gooddetail.getWayName}</p>
                        <p><span class="paddingR20">服务门店:</span>${gooddetail.address}</p>
                    </div>
                </div>

                <c:if test="${receiveTest!=null }">
                    <div class="widget-box">
                        <div class="widget-title bg_ly" >
                        <span class="icon">
                            <a href="${adminPath}/order/editReceiveTest/${order.orderno}/${order.type}"> <i class="iconfont icon-edit" title="编辑"></i></a>
                        </span>

                            <h5>收货证明</h5>
                        </div>
                        <div class="widget-content nopadding collapse in" id="collapseG3">
                            <ul class="recent-posts">
                                <li class="h100"  >
                                    <img width="100" height="100" alt="User" src="${receiveTest.imgurl}" style="height:100px;display: inline-block;float: left">
                                </li>
                            </ul>
                        </div>

                        <c:if test="${receiveTest!=null && receiveTest.checkport!=''}">
                            <div style="padding: 1rem;">
                                <span class="paddingR20">描述:${receiveTest.checkport}</span>
                            </div>
                        </c:if>

                    </div>
                </c:if>


                <c:if test="${rpictures!=null && rpictures.size()>0}">
                    <div class="widget-box" >
                        <div class="widget-title bg_ly">
                        <span class="icon">
                            <a href="${adminPath}/order/editCheckport/${order.orderno}/${order.type}/${gooddetail.serviceId}"> <i class="iconfont icon-edit" title="编辑"></i></a>
                        </span>
                            <h5>检测报告</h5>
                        </div>
                        <div class="widget-content nopadding collapse in">
                            <ul class="recent-posts">
                                <c:forEach items="${rpictures}" var="item">
                                    <li class="h100"  >
                                        <img width="100" height="100" alt="User" src="${item.url}" style="height:100px;display: inline-block;float: left">
                                    </li>
                                </c:forEach>
                            </ul>
                        </div>
                        <c:if test="${gooddetail!=null && gooddetail.checkreport!=''}">
                            <div style="padding: 1rem;" >
                                <span class="paddingR20">${gooddetail.checkreport}</span>
                            </div>
                        </c:if>
                    </div>
                </c:if>


                <div class="widget-box">
                    <div class="widget-title bg_lg"><span class="icon"><i class="icon-signal"></i></span>
                        <h5>待办事项</h5>
                    </div>
                    <div class="widget-content" >
                        <div class="row-fluid">

                            <div class="span12">
                                <ul class="site-stats">

                                    <c:if test="${order.shoporderstatusCode=='003002' || order.shoporderstatusCode=='003003'}">
                                        <li class="bg_lh">  <a href="${adminPath}/order/addReceiveTest/${order.orderno}/${order.type}/${order.openid}"><i class="icon-user"></i> <strong>填写收货证明</strong></a> </li>
                                    </c:if>
                                    <c:if test="${order.shoporderstatusCode=='003004'}">
                                        <li class="bg_lh"> <a href="${adminPath}/order/addCheckport/${order.orderno}/${order.type}/${gooddetail.serviceId}/${gooddetail.getway}"><i class="icon-plus"></i> <strong>填写检测报告</strong></a> </li>
                                    </c:if>
                                    <%--<c:if test="${order.shoporderstatusCode=='001005'}">--%>
                                        <%--<li class="bg_lh"><a href="" data-toggle="modal" data-target="#myModal"><i class="icon-shopping-cart"></i> <strong>3.翻新服务完成确认</strong></a></li>--%>
                                    <%--</c:if>--%>
                                    <c:if test="${order.shoporderstatusCode=='003006'}">
                                        <li class="bg_lh"><a href="${adminPath}/order/addOrderPicture/${order.orderno}/${order.type}/${order.openid}"><i class="icon-tag"></i><strong>拍照和填写物流单号</strong></a></li>
                                    </c:if>
                                    <c:if test="${order.shoporderstatusCode=='003007' && gooddetail.getway=='002'}">
                                        <li class="bg_lh"><a href="" data-toggle="modal" data-target="#myModal3"><i class="icon-shopping-cart"></i><strong>客户取货</strong></a></li></li>
                                    </c:if>
                                    <%--<c:if test="${order.shoporderstatusCode=='001007'}">--%>
                                    <%--<li class="bg_lh"><a href="javascript:void(0)" onclick="handler.confirmOK(this,'${order.orderno}','${order.type}')"><i class="icon-repeat"></i> <strong>5.确认完成</strong></a></li>--%>
                                    <%--</c:if>--%>
                                    <c:if test="${order.shoporderstatusCode!='003002' && order.shoporderstatusCode!='003003' && order.shoporderstatusCode!='003004' && order.shoporderstatusCode!='003006'&& order.shoporderstatusCode!='003007'}">
                                        暂无
                                    </c:if>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>




            </div>
        </div>
    </div>
</div>


<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal3" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel3">客户是否已取货</h4>
            </div>
            <div class="modal-body">
                <p><lable><input type="radio" value="001" name="confirmRefurbish" checked>  已取</lable></p>
                <p><lable><input type="radio" value="002" name="confirmRefurbish">未取</lable></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭
                </button>
                <button type="button" class="btn btn-primary"  onclick="handler.pickup(this,'${order.orderno}','${order.type}','${gooddetail.getway}')">
                    提交更改
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>


<div id="showImg" style="display: none;">
       <img src="" alt="" class="box"/>
</div>
<!--end-main-container-part-->

<!--Footer-part-->
<%@include file="/WEB-INF/pages/common/footer.jsp"%>
<!--end-Footer-part-->

<%@include file="/WEB-INF/pages/common/commonJS.jsp"%>
<script src="${basePath}/resources/js/excanvas.min.js"></script>
<script src="${basePath}/resources/js/jquery.ui.custom.js"></script>
<script src="${basePath}/resources/js/bootstrap.min.js"></script>
<script src="${basePath}/resources/js/jquery.flot.min.js"></script>
<script src="${basePath}/resources/js/jquery.flot.resize.min.js"></script>
<script src="${basePath}/resources/js/jquery.peity.min.js"></script>
<script src="${basePath}/resources/js/fullcalendar.min.js"></script>
<script src="${basePath}/resources/js/matrix.js"></script>
<script src="${basePath}/resources/js/matrix.dashboard.js"></script>
<script src="${basePath}/resources/js/jquery.gritter.min.js"></script>
<script src="${basePath}/resources/js/matrix.interface.js"></script>
<script src="${basePath}/resources/js/matrix.chat.js"></script>
<script src="${basePath}/resources/js/jquery.validate.js"></script>
<script src="${basePath}/resources/js/matrix.form_validation.js"></script>
<script src="${basePath}/resources/js/jquery.wizard.js"></script>
<script src="${basePath}/resources/js/jquery.uniform.js"></script>
<script src="${basePath}/resources/js/select2.min.js"></script>
<script src="${basePath}/resources/js/matrix.popover.js"></script>
<script src="${basePath}/resources/js/jquery.dataTables.min.js"></script>
<script src="${basePath}/resources/js/matrix.tables.js"></script>
<script src="${basePath}/resources/js/admin/showImg.js"></script>
<script src="${basePath}/resources/js/admin/handler.js"></script>


<script type="text/javascript">
    // 这个函数是从弹出菜单中调用来传递的
    // 不同的页面。忽略返回的值是一个空字符串：
    function goPage (newURL) {

        // 如果URL是空的，跳过菜单分隔和菜单选择重置为默认
        if (newURL != "") {
            //如果网址是“-”，它是这个页面-重置菜单：
            if (newURL == "-" ) {
                resetMenu();
            }
            // 其他的，发送页面到指定的网址
            else {
                document.location.href = newURL;
            }
        }
    }

    // 重置菜单选择进入这个页面:
    function resetMenu() {
        document.gomenu.selector.selectedIndex = 2;
    }

//    function BigImage(){
//        var screenImage = $("img");
//            var theImage = new Image();
//            theImage.src = screenImage.attr("src");
//            var imageWidth = theImage.width;
//            var imageHeight = theImage.height;
//    }
//    $("img").on('click',function(){
//        var theImage = new Image();
//        theImage.src = $(this).attr("src");
//        var imageWidth = theImage.width;
//        var imageHeight = theImage.height;
//        $("#showImg").find("img").attr("src" , theImage.src).css({width:theImage.width,height:theImage.height});
//        $("#showImg").show();
//    });
//    $("#showImg").on('click',function(){
//        $("#showImg").hide();
//    });
    $(function () {
        imgerr.init();
    })
</script>
<script>

    imgerr.init();
    handler.getExpress();
</script>
</body>
</html>
